// @flow
import React, { Component } from 'react'
import { limitRules } from 'store/modules/publicWebJson'

type Props = {
  data: Object
}
class LimitActions extends Component {
  props: Props
  render () {
    const { rule } = this.props.data
    let ruleName = ''
    const rulesArry = limitRules.filter((dd) => dd.value === rule)
    if (rulesArry.length > 0) {
      ruleName = rulesArry[0].name
    }
    return (
      <div>
        {ruleName}
      </div>
    )
  }
}

export default LimitActions
